home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-12-03 | 4.6 KB | 184 lines |
- /*
- A basic extension of the java.applet.Applet class
- */
-
- import java.awt.*;
- import java.applet.*;
-
- public class Applet1 extends Applet {
- void button1_Clicked(Event event) {
-
-
- //{{CONNECTION
- // Hide the Applet
- hide();
- //}}
- }
-
- void About_Clicked(Event event) {
-
-
- //{{CONNECTION
- // Create and show the Frame with a title...
- (new About("Multimedia Sample About Box...")).show();
- //}}
- }
-
- void Plasma_Clicked(Event event) {
-
-
- //{{CONNECTION
- // Create and show the Frame with a title...
- (new Plasma("Visual Cafe Plasma Sample")).show();
- //}}
- }
-
- void Fireworks_Clicked(Event event) {
-
-
- //{{CONNECTION
- // Create and show the Frame with a title...
- (new Fireworks("Visual Cafe Fireworks Sample")).show();
- //}}
- }
-
- void Sound_Clicked(Event event) {
-
-
- //{{CONNECTION
- // Create and show the Frame with a title...
- (new Sound("Visual Cafe Sound Player Sample")).show();
- //}}
- }
-
- void Animation_Clicked(Event event) {
-
-
- //{{CONNECTION
- // Create and show the Frame with a title...
- (new Animation("Visual Cafe Moving Animation Sample")).show();
- //}}
- }
-
- void Slideshow_Clicked(Event event) {
-
-
- //{{CONNECTION
- // Create and show the Frame with a title...
- (new Slideshow("Visual Cafe Slideshow Sample")).show();
- //}}
- }
-
- void Emblaze_Clicked(Event event) {
-
-
- //{{CONNECTION
- // Create and show the Frame with a title...
- (new Emblaze("Visual Cafe Emblaze Sample")).show();
- //}}
- }
-
-
- public void init() {
- super.init();
-
- // Take out this line if you don't use symantec.itools.net.RelativeURL
- symantec.itools.lang.Context.setDocumentBase(getDocumentBase());
-
- //{{INIT_CONTROLS
- setLayout(null);
- addNotify();
- resize(426,237);
- setBackground(new Color(4227200));
- borderPanel1 = new symantec.itools.awt.BorderPanel();
- borderPanel1.setLayout(null);
- borderPanel1.reshape(33,12,361,206);
- add(borderPanel1);
- borderPanel1.setLabel("Visual Cafe Multimedia Samples");
- borderPanel1.setLabelColor(new Color(0));
- borderPanel1.setAlignStyle(symantec.itools.awt.BorderPanel.ALIGN_LEFT);
- borderPanel1.setPaddingTop(10);
- borderPanel1.setPaddingBottom(6);
- borderPanel1.setPaddingLeft(6);
- borderPanel1.setPaddingRight(6);
- borderPanel1.setIPadTop(2);
- borderPanel1.setIPadBottom(7);
- borderPanel1.setIPadSides(4);
- borderPanel1.setBorderColor(new Color(0));
- borderPanel1.setBevelStyle(symantec.itools.awt.BorderPanel.BEVEL_LINE);
- Emblaze = new java.awt.Button("Emblaze");
- Emblaze.reshape(10,14,92,24);
- borderPanel1.add(Emblaze);
- Slideshow = new java.awt.Button("Slideshow");
- Slideshow.reshape(10,66,92,24);
- borderPanel1.add(Slideshow);
- Sound = new java.awt.Button("Sound Player");
- Sound.reshape(120,66,92,24);
- borderPanel1.add(Sound);
- Animation = new java.awt.Button("Animation");
- Animation.reshape(120,14,92,24);
- borderPanel1.add(Animation);
- Plasma = new java.awt.Button("Plasma");
- Plasma.reshape(230,66,92,24);
- borderPanel1.add(Plasma);
- Fireworks = new java.awt.Button("Fireworks");
- Fireworks.reshape(230,14,92,24);
- borderPanel1.add(Fireworks);
- About = new java.awt.Button("About");
- About.reshape(43,141,92,24);
- borderPanel1.add(About);
- button1 = new java.awt.Button("Close");
- button1.reshape(210,141,92,24);
- borderPanel1.add(button1);
- //}}
- }
-
- public boolean handleEvent(Event event) {
- if (event.target == Emblaze && event.id == Event.ACTION_EVENT) {
- Emblaze_Clicked(event);
- return true;
- }
- if (event.target == Slideshow && event.id == Event.ACTION_EVENT) {
- Slideshow_Clicked(event);
- return true;
- }
- if (event.target == Animation && event.id == Event.ACTION_EVENT) {
- Animation_Clicked(event);
- return true;
- }
- if (event.target == Sound && event.id == Event.ACTION_EVENT) {
- Sound_Clicked(event);
- return true;
- }
- if (event.target == Fireworks && event.id == Event.ACTION_EVENT) {
- Fireworks_Clicked(event);
- return true;
- }
- if (event.target == Plasma && event.id == Event.ACTION_EVENT) {
- Plasma_Clicked(event);
- return true;
- }
- if (event.target == About && event.id == Event.ACTION_EVENT) {
- About_Clicked(event);
- return true;
- }
- if (event.target == button1 && event.id == Event.ACTION_EVENT) {
- button1_Clicked(event);
- return true;
- }
- return super.handleEvent(event);
- }
-
- //{{DECLARE_CONTROLS
- symantec.itools.awt.BorderPanel borderPanel1;
- java.awt.Button Emblaze;
- java.awt.Button Slideshow;
- java.awt.Button Sound;
- java.awt.Button Animation;
- java.awt.Button Plasma;
- java.awt.Button Fireworks;
- java.awt.Button About;
- java.awt.Button button1;
- //}}
- }
-